namespace Digitalmes.Application.Sys;

/// <summary>
/// 城市表
/// </summary>
public class SysCityDto : Dto
{
    /// <summary>
    /// 城市名称
    /// </summary>
    [Required]
    [StringLength(64)]
    public string? Name { get; set; }

    /// <summary>
    /// 所属上级
    /// </summary>
    public long ParentId { get; set; }

    /// <summary>
    /// 所属上级组
    /// </summary>
    [NotNull]
    public List<long>? ParentIdList { get; set; }

    /// <summary>
    /// 层级
    /// </summary>
    public int Layer { get; set; } = 1;

    /// <summary>
    /// 城市编号
    /// </summary>
    public string? Code { get; set; }

    /// <summary>
    /// 经度
    /// </summary>
    public string? Longitude { get; set; }

    /// <summary>
    /// 维度
    /// </summary>
    public string? Dimension { get; set; }

    /// <summary>
    /// 排序，默认为 1
    /// </summary>
    public int Sort { get; set; } = 1;

    /// <summary>
    /// 添加时间
    /// </summary>
    [Required]
    public DateTime AddTime { get; set; } = DateTime.Now;
}
